#ifndef UMLCLASSDIAGRAMM_H
#define UMLCLASSDIAGRAMM_H

#include <QDebug>

#include <QGraphicsSceneMouseEvent>
#include <QGraphicsSceneDragDropEvent>

#include "uml/umlrelationalitem.h"
#include "uml/projects/umlproject.h"
#include "gui/dock/tooldock/classdiagrammdock.h"
#include "uml/class/umlclassitem.h"

class UmlClassDiagramm : public UmlProject
{
    Q_OBJECT
public:
    UmlClassDiagramm();

    void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
    void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
    void dropEvent(QGraphicsSceneDragDropEvent *event);

    void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);

    QDockWidget* itemDock();

private:
    UmlGraphicsItem *_itemUnderMouse;
    bool _itemAcceptsDrop;

    void initToolbar(QToolBar *toolbar);
    QString findAvailableTypeName(QString label = "NewClass");

signals:
    void itemUnderMouseHasChanged();

};

#endif // UMLCLASSDIAGRAMM_H
